<template>
    <view class="gui-border-t" style="padding: 20rpx;" v-for="(k, index) in materialGroups" :key="index">
        <view class="card-body-item" v-if="k.contractNumber">
            <text class="body-item-title">{{ $t('taskList.contractNumber') }}：</text> {{ k.contractNumber }}
        </view>
        <view class="card-body-item">
            <text class="body-item-title">{{ $t('distributedEnter.materialCode') }}：</text> {{ k.materialCode }}
        </view>
        <view class="card-body-item">
            <text class="body-item-title">{{ $t('distributedEnter.materialName') }}：</text> {{ k.materialName }}
        </view>
        <view class="card-body-item" v-if="k.materialSpec != ' '|| k.spec != ' '">
            <text class="body-item-title">{{ $t('distributedEnter.materialSpec') }}：</text> {{ k.materialSpec || k.spec }}
        </view>
        <view class="card-body-item">
            <text class="body-item-title">{{ $t('distributedEnter.materialQty') }}：</text> {{ k.sumQty || k.qty }}
        </view>
        <view class="card-body-item" v-if="keyName == '1'">
            <text class="body-item-title">{{ $t('pageTranslation.retiredNumber') }}：</text> {{ k.returnTotalQty||k.returnQty }}
        </view>
        <view class="card-body-item" v-if="k.instockQty">
            <text class="body-item-title">{{ $t('distributedEnter.quantityInStorage') }}：</text> {{ k.instockQty }}
        </view>
        <view class="card-body-item">
            <text class="body-item-title">{{ $t('distributedEnter.uom') }}：</text> {{ k.unit }}
        </view>
        <!-- <view class="card-body-item" v-if="k.unit=='LBS'">
            <text class="body-item-title">{{$t('taskList.conversionQty')}}：</text> {{(Number(k.sumQty||k.qty)*0.4536).toFixed(4)}} kg
        </view> -->
    </view>
</template>

<script setup>
import {
    defineProps
} from 'vue'
const props = defineProps({
    // 标识五金退料界面展示标识
    keyName: {
        type: String,
        default: '0'
    },
    // 传过来的数组
    materialGroups: {
        type: Array,
        default: []
    },
})
</script>

<style lang="scss"></style>
